package com.mmall.enums;

/**
 * @author zhangxiaolin@zhonhajt.com
 * @Title: 接口出参状态码
 * @Package com.mmall.enums
 * @Description:
 * @date 2018/9/5 13:54
 */
public enum ResponseCode {

    SUCCESS(0, "SUCCESS"),
    ERROR(1, "ERROR"),
    NEED_LOGIN(10, "NEED_LOGIN"),  //需要登录
    ILLEGAL_ARGUMENT(2, "ILLEGAL_ARGUMENT");  //参数错误

    /**
     * 状态code
     */
    private  int code;
    /**
     * 结果信息
     */
    private  String desc;

    ResponseCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}


